package com.power.sifa.approve.model;

import com.plf.common.domain.YesNo;
import com.plf.core.common.annotations.FieldEnumText;
import com.plf.core.common.domain.BaseModel;
import com.power.sifa.approve.model.enumeration.St_admreview;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

/**
*  行政复议申请实体类
*/

@Entity
@ApiModel(value="行政复议申请")
@Data
@Table(name="Apl_admreview",schema="sfapprove")
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
//@IdClass(Apl_admreview.Apl_admreviewPK.class) 用于复合组件
public class Apl_admreview extends BaseModel implements Serializable {

	private static final long serialVersionUID = 1L;

    @Id
    @Setter(AccessLevel.NONE)
    @ApiModelProperty(value = "id")
    private String id;

    @ApiModelProperty(value = "申请人")
    private String applyname;

    @ApiModelProperty(value = "是否委托代理人")
    private Integer isagent;

    @ApiModelProperty(value = "代理人")
    private String agentname;

    @ApiModelProperty(value = "被申请人")
    private String targetname;

    @ApiModelProperty(value = "被申请人的行政区划")
    private String targetadid;

    @ApiModelProperty(value = "是否行政不作为")
    private Integer isomission;

    @ApiModelProperty(value = "申请人曾要求被申请人履行何种法定职责")
    private String omcontent;

    @ApiModelProperty(value = "要求被申请人履行法定职责日期")
    private String omdate;

    @ApiModelProperty(value = "要求被申请人履行法定职责的方式")
    private Integer omway;

    @ApiModelProperty(value = "行政行为名称")
    private String prname;

    @ApiModelProperty(value = "行政行为文号")
    private String prcode;

    @ApiModelProperty(value = "知道该行政行为日期")
    private String prdate;

    @ApiModelProperty(value = "行政行为知晓方式")
    private Integer prway;

    @ApiModelProperty(value = "行政复议请求说明")
    private String admrequest;

    @ApiModelProperty(value = "是否申请规范性文件审查")
    private Integer ischeckdoc;

    @ApiModelProperty(value = "是否就同一事项向其他行政复议机关提出申请")
    private Integer isexreview;

    @ApiModelProperty(value = "是否就同一事项像人民法院提起诉讼")
    private Integer isexlawsuit;

    @ApiModelProperty(value = "是否申请国家赔偿")
    private Integer ispay;

    @ApiModelProperty(value = "申请赔偿金额")
    private BigDecimal paymoney;

    @ApiModelProperty(value = "是否申请进行调解")
    private Integer ismediate;

    @ApiModelProperty(value = "事实和理由")
    private String reason;

    @ApiModelProperty(value = "行政复议状态")
    private Integer status = St_admreview.WRITTEN;

    @ApiModelProperty(value = "调解结果")
    private String mediateresult;

    @ApiModelProperty(value = "是否存在第三人")
    private Integer isthird;

    @ApiModelProperty(value = "第三人")
    private String thirdname;

    @ApiModelProperty(value = "行政行为类型")
    private Integer prtype;

    @ApiModelProperty(value = "行政复议请求（行政作为）")
    private String prrequest;

    @ApiModelProperty(value = "行政复议请求（不作为）")
    private String omrequest;

    @ApiModelProperty(value = "行政管理类别")
    private String mgrcate;

    @ApiModelProperty(value = "行政管理子类")
    private String mgrsub;

    @ApiModelProperty(value = "管理行政区划")
    private String mgradid;

    @ApiModelProperty(value = "行政行为子项")
    private Integer prtypesub;

    @ApiModelProperty(value = "处罚金额")
    private Double prmoney;

    @ApiModelProperty(value = "是否行政行为前置")
    private Integer isfront;

    @ApiModelProperty(value = "被申请人是否已答复")
    private Integer istargetreply = YesNo.NO;

    @ApiModelProperty(value = "行政复议子状态")
    private String sonstatus;

    @ApiModelProperty(value = "是否中止")
    private Integer isrest = YesNo.NO;

    @ApiModelProperty(value = "中止日期")
    private String restdate;

    @ApiModelProperty(value = "决定类型")
    private Integer decisiontype;

    @ApiModelProperty(value = "决定日期")
    private String decisiondate;

    @ApiModelProperty(value = "是否强制执行")
    private Integer isforce;

    @ApiModelProperty(value = "是否自行履行")
    private Integer isselfexecute;

    @ApiModelProperty(value = "是否责令履行")
    private Integer isperform;

    @ApiModelProperty(value = "受理第一立案审查人id")
    private String acceptfirstid;

    @ApiModelProperty(value = "受理第一立案审查人名称")
    private String acceptfirstname;

    @ApiModelProperty(value = "受理第二立案审查人id")
    private String acceptsecondid;

    @ApiModelProperty(value = "受理第二立案审查人名称")
    private String acceptsecondname;

    @ApiModelProperty(value = "程序类型")
    private Integer proctype;

    @ApiModelProperty(value = "是否延期")
    private Integer isdelay  = YesNo.NO;

    @ApiModelProperty(value = "审理第一立案审查人id")
    private String hearfirstid;

    @ApiModelProperty(value = "审理第一立案审查人名称")
    private String hearfirstname;

    @ApiModelProperty(value = "审理第二立案审查人id")
    private String hearsecondid;

    @ApiModelProperty(value = "审理第二立案审查人名称")
    private String hearsecondname;

    @ApiModelProperty(value = "期满日期")
    private String quedate;

    @ApiModelProperty(value = "决定类型id")
    private Integer decisiontypeid;

    @ApiModelProperty(value = "决定类型名称")
    private String decisiontypename;

    @ApiModelProperty(value = "案件收到时间")
    private String receivetime;




    /**Apl_admre_audit
     * 申请流水号
     */
    @Transient
    private String applycode;

    /**
     * 行政复议录入人
     */
    @Transient
    private String regusername;

    /**
     *  行政复议创建时间
     */
    @Transient
    private String createtime;

    /**
     *  案件号
     */
    @Transient
    private String acceptcode;

    /**
     *  applyid
     */
    @Transient
    private String applyid;

    /**
     *  是否委托代理人文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="isagent")
    private String isagent_text;

    /**
     *  是否行政不作为文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="isomission")
    private String isomission_text;

    /**
     *  要求被申请人履行法定职责的方式文本
     */
    @Transient
    @FieldEnumText(eum="Tp_wayom", valuefield="omway")
    private String omway_text;

    /**
     *  行政复议请求（不作为）文本
     */
    @Transient
    @FieldEnumText(eum="Tp_requestom", valuefield="omrequest")
    private String omrequest_text;

    /**
     *  行政行为知晓方式文本
     */
    @Transient
    @FieldEnumText(eum="Tp_waypr", valuefield="prway")
    private String prway_text;

    /**
     *  行政复议请求（行政作为）文本
     */
    @Transient
    @FieldEnumText(eum="Tp_requestpr", valuefield="prrequest")
    private String prrequest_text;

    /**
     *  是否申请规范性文件审查文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="ischeckdoc")
    private String ischeckdoc_text;

    /**
     *  是否就同一事项向其他行政复议机关提出申请文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="isexreview")
    private String isexreview_text;

    /**
     *  是否就同一事项像人民法院提起诉讼文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="isexlawsuit")
    private String isexlawsuit_text;

    /**
     *  是否申请国家赔偿文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="ispay")
    private String ispay_text;

    /**
     *  是否申请进行调解文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="ismediate")
    private String ismediate_text;

    /**
     *  行政复议状态文本
     */
    @Transient
    @FieldEnumText(eum="St_admreview", valuefield="status")
    private String status_text;


    /**
     *  apl_main的状态 st_apply
     */
    @Transient
    private Integer mainstatus;

    /**
     * 行政行为类型文本
     */
    @Transient
    @FieldEnumText(eum="Tp_admpr", valuefield="prtype")
    private String prtype_text;

    /**
     * 行政行为子类型文本
     */
    @Transient
    @FieldEnumText(eum="Tp_admprsub", valuefield="prtypesub")
    private String prtypesub_text;

    /**
     * 决定类型文本
     */
    @Transient
    @FieldEnumText(eum="Tp_decision", valuefield="decisiontype")
    private String decisiontype_text;


    /**
     * 程序类型
     */
    @Transient
    @FieldEnumText(eum="Tp_apptype", valuefield="proctype")
    private String proctype_text;

    /**
     * 申请来源
     */
    @Transient
    private Integer source;

    /**
     *  申请来源文本
     */
    @Transient
    @FieldEnumText(eum="Tp_applysource", valuefield="source")
    private String source_text;

    /**
     * 决定时间
     */
    @Transient
    private String decisiontime;

    /**
     * 归档时间
     */
    @Transient
    private String archivetime;

    /**
     * 流程实例id
     */
    @Transient
    private String instid;

    /**
     *  是否延期文本
     */
    @Transient
    @FieldEnumText(eum="yesNo", valuefield="isdelay")
    private String isdelay_text;


    public Map<String, Object> parseMap() {
        Map<String, Object> map=new HashMap<>();
        map.put("id", this.getId());
        map.put("applyname", this.getApplyname());
        map.put("isagent_text", this.isagent_text);
        map.put("isagent", this.getIsagent());
        map.put("agentname", this.getAgentname());
        map.put("targetname", this.getTargetname());
        map.put("targetadid", this.getTargetadid());
        map.put("isomission_text", this.isomission_text);
        map.put("isomission", this.getIsomission());
        map.put("omcontent", this.getOmcontent());
        map.put("omdate", this.getOmdate());
        map.put("omway_text", this.omway_text);
        map.put("omway", this.getOmway());
        map.put("omrequest_text", this.omrequest_text);
        map.put("prname", this.getPrname());
        map.put("prcode", this.getPrcode());
        map.put("prdate", this.getPrdate());
        map.put("prway_text", this.prway_text);
        map.put("prway", this.getPrway());
        map.put("prrequest_text", this.prrequest_text);
        map.put("ischeckdoc_text", this.ischeckdoc_text);
        map.put("ischeckdoc", this.getIscheckdoc());
        map.put("isexreview_text", this.isexreview_text);
        map.put("isexreview", this.getIsexreview());
        map.put("isexlawsuit_text", this.isexlawsuit_text);
        map.put("isexlawsuit", this.getIsexlawsuit());
        map.put("ispay_text", this.ispay_text);
        map.put("ispay", this.getIspay());
        map.put("paymoney", this.getPaymoney());
        map.put("ismediate_text", this.ismediate_text);
        map.put("ismediate", this.getIsmediate());
        map.put("reason", this.getReason());
        map.put("status_text", this.status_text);
        map.put("status", this.getStatus());
        map.put("mediateresult", this.getMediateresult());
        map.put("regusername", this.regusername);
        map.put("applycode", this.applycode);
        map.put("createtime", this.createtime);
        map.put("decisiontypeid", this.getDecisiontypeid());
        map.put("decisiontypename", this.getDecisiontypename());
        map.put("receivetime", this.getReceivetime());
        return map;
    }


    public String getId() {
        return id;
    }


    public void setId(Serializable id) {
        this.id = (String) id;
    }

    public Serializable getPrimaryKey() {
        return id;
        // return new Apl_admreviewPK(id, id2); 用于复合主键，请手动创建内部静态类
    }

    public void setPrimaryKey(Serializable key) {
        this.id = (String)key;

        //Apl_admreviewPK pk = (Apl_admreviewPK) key; 用于复合主键
        //this.id = pk.getId();
        //this.id2 = pk.getId2();
    }

}
